import {
  ProForm,
  ProFormRadio,
  ProFormText,
  ProFormSelect,
} from "@ant-design/pro-components";
import { Button } from 'antd';
import ProEditor from "@/components/Editor";
import MapSelect from '@/components/MapSelect';
import { VenueStatus, VenueTypes } from '@/enum/venue';

const BasicForm = () => {
  return (
    <ProForm
      layout="vertical"
      submitter={false}
    >
      <ProFormText
        required
        name="name"
        label="场馆名称"
      />
      <ProFormSelect
        required
        name="type"
        label="场馆类型"
        valueEnum={VenueTypes}
      />
      <ProForm.Item
        required
        name="city"
        label="场馆地址"
      >
        <MapSelect />
      </ProForm.Item>
      <ProFormRadio.Group
        required
        label="场馆状态"
        name="status"
        valueEnum={VenueStatus}
        initialValue="ENABLED"
      />
      <ProFormText
        required
        label="服务热线"
        name="serviceLine"
      />
      <ProForm.Item
        required
        label="场馆描述"
        name="description"
      >
        <ProEditor />
      </ProForm.Item>
      <div style={{ textAlign: 'right' }}>
        <Button type="primary">保存</Button>
      </div>
    </ProForm>
  );
}

export default BasicForm;